package com.cmx.controller;

import com.cmx.model.User;
import com.cmx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by cmx on 2017/5/12.
 */
@RestController
@RequestMapping(value = "/login")
public class LoginController extends BaseController {

    @Autowired
    private UserService userService;
    @RequestMapping(value = "/register")
    public ResponseEntity register(User user){

        userService.insertUser(user);
        return new ResponseEntity(1, HttpStatus.OK);
    }

    @RequestMapping(value = "checkin")
    public ResponseEntity checkIn(String uname,String password){

        return null;
    }
}
